package com.mambike.dubboconsumer.rest;

import com.mambike.dubbocommon.pojo.CommonResult;
import com.mambike.dubboconsumer.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jiax
 * @version 1.0.0
 * @description: UserRest
 * @date 2025-01-21 10:39
 */
@RestController
@RequestMapping("/user")
public class UserRest {
    @Autowired
    private IUserService iUserService;

    /**
     *
     * @param userId
     * @return
     */
    @GetMapping("/findByUserId/{userId}")
    public CommonResult findByUserId(@PathVariable("userId") Long userId){
        return iUserService.findByUserId(userId);
    }

}
